const { resolve } = require('path')
const htmlPlugin = require('html-webpack-plugin')
const { VueLoaderPlugin } = require('vue-loader')
const VueSsrClientPlugin = require('vue-server-renderer/client-plugin')
const { merge } = require('webpack-merge')
const baseConfig = require('./webpack.config')

module.exports = merge(baseConfig, {
  entry: {
    client: './entry/client.entry.js'
  },
  plugins: [
    new VueSsrClientPlugin(),
    new htmlPlugin({
      filename: 'index.html',
      template: resolve('./public/index.html')
    }),
  ]
})